package com.tudouji.project.harvest.service.impl;

import java.util.List;
import com.tudouji.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tudouji.project.harvest.mapper.WeightDeniedDataMapper;
import com.tudouji.project.harvest.domain.WeightDeniedData;
import com.tudouji.project.harvest.service.IWeightDeniedDataService;

/**
 * 过磅系统未采纳数据Service业务层处理
 * 
 * @author tudouji
 * @date 2022-03-28
 */
@Service
public class WeightDeniedDataServiceImpl implements IWeightDeniedDataService 
{
    @Autowired
    private WeightDeniedDataMapper weightDeniedDataMapper;

    /**
     * 查询过磅系统未采纳数据
     * 
     * @param id 过磅系统未采纳数据ID
     * @return 过磅系统未采纳数据
     */
    @Override
    public WeightDeniedData selectWeightDeniedDataById(Long id)
    {
        return weightDeniedDataMapper.selectWeightDeniedDataById(id);
    }

    /**
     * 查询过磅系统未采纳数据列表
     * 
     * @param weightDeniedData 过磅系统未采纳数据
     * @return 过磅系统未采纳数据
     */
    @Override
    public List<WeightDeniedData> selectWeightDeniedDataList(WeightDeniedData weightDeniedData)
    {
        return weightDeniedDataMapper.selectWeightDeniedDataList(weightDeniedData);
    }

    /**
     * 新增过磅系统未采纳数据
     * 
     * @param weightDeniedData 过磅系统未采纳数据
     * @return 结果
     */
    @Override
    public int insertWeightDeniedData(WeightDeniedData weightDeniedData)
    {
        weightDeniedData.setCreateTime(DateUtils.getNowDate());
        return weightDeniedDataMapper.insertWeightDeniedData(weightDeniedData);
    }

    /**
     * 修改过磅系统未采纳数据
     * 
     * @param weightDeniedData 过磅系统未采纳数据
     * @return 结果
     */
    @Override
    public int updateWeightDeniedData(WeightDeniedData weightDeniedData)
    {
        weightDeniedData.setUpdateTime(DateUtils.getNowDate());
        return weightDeniedDataMapper.updateWeightDeniedData(weightDeniedData);
    }

    /**
     * 批量删除过磅系统未采纳数据
     * 
     * @param ids 需要删除的过磅系统未采纳数据ID
     * @return 结果
     */
    @Override
    public int deleteWeightDeniedDataByIds(Long[] ids)
    {
        return weightDeniedDataMapper.deleteWeightDeniedDataByIds(ids);
    }

    /**
     * 删除过磅系统未采纳数据信息
     * 
     * @param id 过磅系统未采纳数据ID
     * @return 结果
     */
    @Override
    public int deleteWeightDeniedDataById(Long id)
    {
        return weightDeniedDataMapper.deleteWeightDeniedDataById(id);
    }
}
